Skip to content

fix(analyze): respect --log-level in output and JSON#194

Merged
43081j merged 4 commits intoe18e:mainfrom
dreyfus92:impl/log-error-filter
Apr 23, 2026
Merged

fix(analyze): respect --log-level in output and JSON#194
43081j merged 4 commits intoe18e:mainfrom
dreyfus92:impl/log-error-filter

Conversation

@dreyfus92
Copy link
Copy Markdown
Collaborator

@dreyfus92 dreyfus92 commented Mar 22, 2026

this wires --log-level through to what you actually see: pretty analyze output and the messages array in --json now only include severities at or above the chosen level, so stuff like --log-level error finally hides warnings/suggestions instead of feeling broken. If you still want the full diagnostic list in JSON but need a stricter exit code, there’s --json-full for that. Unknown message severities are treated like warnings so nothing silently disappears.

closes: #192

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 22, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@e18e/cli@194

commit: f6f2857

@dreyfus92 dreyfus92 changed the title fix(analyze): respect --log-level in output and JSON fix(analyze): respect --log-level in output and JSON Mar 22, 2026
Comment thread src/commands/analyze.meta.ts Outdated
@dreyfus92 dreyfus92 requested a review from 43081j April 22, 2026 23:10
description:
'Only show errors in Results and JSON messages (same idea as ESLint --quiet). Overrides --report-level.'
},
'report-level': {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should just be severity?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think report-level makes sense in this case

@43081j 43081j merged commit 82132da into e18e:main Apr 23, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--log-level error seems to have no effect

3 participants